3.5.44 \(\int \sec ^6(c+d x) (a+b \tan ^2(c+d x))^2 \, dx\) [444]

Optimal. Leaf size=96 \[ \frac {a^2 \tan (c+d x)}{d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \]

[Out]

a^2*tan(d*x+c)/d+2/3*a*(a+b)*tan(d*x+c)^3/d+1/5*(a^2+4*a*b+b^2)*tan(d*x+c)^5/d+2/7*b*(a+b)*tan(d*x+c)^7/d+1/9*
b^2*tan(d*x+c)^9/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3756, 380} \begin {gather*} \frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {b^2 \tan ^9(c+d x)}{9 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6*(a + b*Tan[c + d*x]^2)^2,x]

[Out]

(a^2*Tan[c + d*x])/d + (2*a*(a + b)*Tan[c + d*x]^3)/(3*d) + ((a^2 + 4*a*b + b^2)*Tan[c + d*x]^5)/(5*d) + (2*b*
(a + b)*Tan[c + d*x]^7)/(7*d) + (b^2*Tan[c + d*x]^9)/(9*d)

Rule 380

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n
)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]

Rule 3756

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \sec ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \left (1+x^2\right )^2 \left (a+b x^2\right )^2 \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (a^2+2 a (a+b) x^2+\left (a^2+4 a b+b^2\right ) x^4+2 b (a+b) x^6+b^2 x^8\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a^2 \tan (c+d x)}{d}+\frac {2 a (a+b) \tan ^3(c+d x)}{3 d}+\frac {\left (a^2+4 a b+b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {2 b (a+b) \tan ^7(c+d x)}{7 d}+\frac {b^2 \tan ^9(c+d x)}{9 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.26, size = 106, normalized size = 1.10 \begin {gather*} \frac {\left (8 \left (21 a^2-6 a b+b^2\right )+4 \left (21 a^2-6 a b+b^2\right ) \sec ^2(c+d x)+3 \left (21 a^2-6 a b+b^2\right ) \sec ^4(c+d x)+10 (9 a-5 b) b \sec ^6(c+d x)+35 b^2 \sec ^8(c+d x)\right ) \tan (c+d x)}{315 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6*(a + b*Tan[c + d*x]^2)^2,x]

[Out]

((8*(21*a^2 - 6*a*b + b^2) + 4*(21*a^2 - 6*a*b + b^2)*Sec[c + d*x]^2 + 3*(21*a^2 - 6*a*b + b^2)*Sec[c + d*x]^4
 + 10*(9*a - 5*b)*b*Sec[c + d*x]^6 + 35*b^2*Sec[c + d*x]^8)*Tan[c + d*x])/(315*d)

________________________________________________________________________________________

Maple [A]
time = 0.27, size = 157, normalized size = 1.64

method result size
derivativedivides \(\frac {b^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \left (\sin ^{5}\left (d x +c \right )\right )}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{5}}\right )+2 a b \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) \(157\)
default \(\frac {b^{2} \left (\frac {\sin ^{5}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {4 \left (\sin ^{5}\left (d x +c \right )\right )}{63 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{5}}\right )+2 a b \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )}{d}\) \(157\)
risch \(\frac {16 i \left (210 a^{2} {\mathrm e}^{12 i \left (d x +c \right )}-420 a b \,{\mathrm e}^{12 i \left (d x +c \right )}+210 b^{2} {\mathrm e}^{12 i \left (d x +c \right )}+945 a^{2} {\mathrm e}^{10 i \left (d x +c \right )}-630 a b \,{\mathrm e}^{10 i \left (d x +c \right )}-315 b^{2} {\mathrm e}^{10 i \left (d x +c \right )}+1701 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-126 a b \,{\mathrm e}^{8 i \left (d x +c \right )}+441 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+1554 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-84 a b \,{\mathrm e}^{6 i \left (d x +c \right )}-126 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+756 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-216 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+36 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+189 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-54 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+9 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+21 a^{2}-6 a b +b^{2}\right )}{315 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}\) \(279\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(b^2*(1/9*sin(d*x+c)^5/cos(d*x+c)^9+4/63*sin(d*x+c)^5/cos(d*x+c)^7+8/315*sin(d*x+c)^5/cos(d*x+c)^5)+2*a*b*
(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35*sin(d*x+c)^3/cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3)-a^2*(-8/15-1/5*
sec(d*x+c)^4-4/15*sec(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 85, normalized size = 0.89 \begin {gather*} \frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, {\left (a b + b^{2}\right )} \tan \left (d x + c\right )^{7} + 63 \, {\left (a^{2} + 4 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{5} + 210 \, {\left (a^{2} + a b\right )} \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/315*(35*b^2*tan(d*x + c)^9 + 90*(a*b + b^2)*tan(d*x + c)^7 + 63*(a^2 + 4*a*b + b^2)*tan(d*x + c)^5 + 210*(a^
2 + a*b)*tan(d*x + c)^3 + 315*a^2*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 1.53, size = 114, normalized size = 1.19 \begin {gather*} \frac {{\left (8 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{8} + 4 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{6} + 3 \, {\left (21 \, a^{2} - 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 10 \, {\left (9 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 35 \, b^{2}\right )} \sin \left (d x + c\right )}{315 \, d \cos \left (d x + c\right )^{9}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/315*(8*(21*a^2 - 6*a*b + b^2)*cos(d*x + c)^8 + 4*(21*a^2 - 6*a*b + b^2)*cos(d*x + c)^6 + 3*(21*a^2 - 6*a*b +
 b^2)*cos(d*x + c)^4 + 10*(9*a*b - 5*b^2)*cos(d*x + c)^2 + 35*b^2)*sin(d*x + c)/(d*cos(d*x + c)^9)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \sec ^{6}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6*(a+b*tan(d*x+c)**2)**2,x)

[Out]

Integral((a + b*tan(c + d*x)**2)**2*sec(c + d*x)**6, x)

________________________________________________________________________________________

Giac [A]
time = 0.83, size = 118, normalized size = 1.23 \begin {gather*} \frac {35 \, b^{2} \tan \left (d x + c\right )^{9} + 90 \, a b \tan \left (d x + c\right )^{7} + 90 \, b^{2} \tan \left (d x + c\right )^{7} + 63 \, a^{2} \tan \left (d x + c\right )^{5} + 252 \, a b \tan \left (d x + c\right )^{5} + 63 \, b^{2} \tan \left (d x + c\right )^{5} + 210 \, a^{2} \tan \left (d x + c\right )^{3} + 210 \, a b \tan \left (d x + c\right )^{3} + 315 \, a^{2} \tan \left (d x + c\right )}{315 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6*(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/315*(35*b^2*tan(d*x + c)^9 + 90*a*b*tan(d*x + c)^7 + 90*b^2*tan(d*x + c)^7 + 63*a^2*tan(d*x + c)^5 + 252*a*b
*tan(d*x + c)^5 + 63*b^2*tan(d*x + c)^5 + 210*a^2*tan(d*x + c)^3 + 210*a*b*tan(d*x + c)^3 + 315*a^2*tan(d*x +
c))/d

________________________________________________________________________________________

Mupad [B]
time = 12.22, size = 80, normalized size = 0.83 \begin {gather*} \frac {a^2\,\mathrm {tan}\left (c+d\,x\right )+\frac {b^2\,{\mathrm {tan}\left (c+d\,x\right )}^9}{9}+{\mathrm {tan}\left (c+d\,x\right )}^5\,\left (\frac {a^2}{5}+\frac {4\,a\,b}{5}+\frac {b^2}{5}\right )+\frac {2\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a+b\right )}{3}+\frac {2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^7\,\left (a+b\right )}{7}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tan(c + d*x)^2)^2/cos(c + d*x)^6,x)

[Out]

(a^2*tan(c + d*x) + (b^2*tan(c + d*x)^9)/9 + tan(c + d*x)^5*((4*a*b)/5 + a^2/5 + b^2/5) + (2*a*tan(c + d*x)^3*
(a + b))/3 + (2*b*tan(c + d*x)^7*(a + b))/7)/d

________________________________________________________________________________________